<HTML> 
<HEAD> 
	<TITLE>3rd Party ROBOTC Drivers</TITLE> 
<link href="tabs.css" rel="stylesheet" type="text/css"/> 
<link href="doxygen.css" rel="stylesheet" type="text/css"/> 
</HEAD> 
 
<BODY bgcolor="#ffffff" link="#000000" vlink="#000000"> 
<table width="100%" bgcolor="navy" cellspacing=0 cellpadding=1 border=0> 
<tr><td><table width="100%" bgcolor="#EEEEDD" cellspacing=0 cellpadding=3 border=0> 
<tr> 
    <td width="33%" align="left"> <img src="images/LOGO_NXT.gif" width=266 height=44 border="0" alt="Mindstorms"></td> 
    <td><b><font size="+3" color="navy">3rd Party ROBOTC Drivers</font></b></td> 
    <td align="right"> <img src="images/logo.png" width=44 height=44 border="0" alt="RobotC"></td>     
</tr> 
  <tr bgcolor="#cccc99" align="right"> 
          <td colspan=3> <font face="arial" size="-1"> [<a href=main.html>Home</a>] [<a target=_top href="https://sourceforge.net/projects/rdpartyrobotcdr/">Download</a>] [<a target=_top href="http://apps.sourceforge.net/mantisbt/rdpartyrobotcdr/my_view_page.php">Submit a bug/suggestion</a>]  [<a target=_top href="http://www.robotc.net/forums/">ROBOTC Forums</a>] [<a target=_top href="http://botbench.com">Blog</a>] [<a target=_top href="http://sourceforge.net/donate/index.php?group_id=257238">Support this project</a>]</font> </td> 
</tr> 
</table></td></tr> 
</table> 
<!-- Generated by Doxygen 1.7.2 -->
<div class="header">
  <div class="summary">
<a href="#files">Files</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<h1>Color Sensor V1<br/>
<small>
[<a class="el" href="group___hi_technic.html">HiTechnic</a>]</small>
</h1>  </div>
</div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="files"></a>
Files</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hitechnic-colour-v1_8h.html">hitechnic-colour-v1.h</a></td></tr>

<p><tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>HiTechnic Color Sensor driver. </p>
<br/></td></tr>
</p>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#ga2a76ad0892f996cc7178faaf9791f192">HTCS_I2C_ADDR</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#gae677f5ade0fb6cf293a3c05a19130b45">HTCS_CMD_REG</a>&#160;&#160;&#160;0x41</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#gae484aed41a5751ac670d59b93c381ef6">HTCS_OFFSET</a>&#160;&#160;&#160;0x42</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#ga48031d09dc69fa4ddeeaa5048b0cc7b6">HTCS_COLNUM_REG</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#gadfe281ee2acf1c368a01f11c9ced2301">HTCS_RED_REG</a>&#160;&#160;&#160;0x01</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#ga2bc065e0ae0c88b3a2274b2f2c5029ab">HTCS_GREEN_REG</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#gac6e1008ac54bd796727bb2b024c94b5c">HTCS_BLUE_REG</a>&#160;&#160;&#160;0x03</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#ga231348f4db7df4344265d3cfe43f8cba">HTCS_RED_RAW_REG</a>&#160;&#160;&#160;0x04</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#gafbcd3ba05b2d2cd43a4846dc7fdb9718">HTCS_GREEN_RAW_REG</a>&#160;&#160;&#160;0x05</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#gaee2f2c7a03a73d2795e10e41f8b30a04">HTCS_BLUE_RAW_REG</a>&#160;&#160;&#160;0x06</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#ga86e23f552e2b245ab759832545c65e69">HTSC_COL_INDEX_REG</a>&#160;&#160;&#160;0x07</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#ga63ecff1a93442ac51d80d87b3ef2a31d">HTSC_RED_NORM_REG</a>&#160;&#160;&#160;0x08</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#ga674677aff9b035ad76b8aa7088d80614">HTSC_GREEN_NORM_REG</a>&#160;&#160;&#160;0x09</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#ga78d88dda248094bc368357c17a744677">HTSC_BLUE_NORM_REG</a>&#160;&#160;&#160;0x0A</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#ga55a7e1240a43a39633d65c210ed0f921">HTCS_CAL_WHITE</a>&#160;&#160;&#160;0x43</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#ga2ffe78205a159ffd11e8074665c293dc">HTCSreadColor</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#ga4de07d555366975fb0673524cdec7b57">HTCSreadRGB</a> (tSensors link, int &amp;red, int &amp;green, int &amp;blue)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#gac07b9f4043e6abbd7d80785afb1e0e6d">HTCSreadNormRGB</a> (tSensors link, int &amp;red, int &amp;green, int &amp;blue)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#gae17b52a255db2290b22bc25fb966eed1">HTCSreadRawRGB</a> (tSensors link, int &amp;red, int &amp;green, int &amp;blue)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#ga850041d1cce06d2fe714780bba407040">HTCScalWhite</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#ga38b8b7f82814d32cba3d6a6f54a85a85">HTCSreadColor</a> (<a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a> muxsensor)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#ga0cc4cf1c6fc26e88fc7a708857ef7ca2">HTCSreadRGB</a> (<a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a> muxsensor, int &amp;red, int &amp;green, int &amp;blue)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#ga27de3044e46a7fc9dda2602617559928">HTCSreadHSV</a> (tSensors link, float &amp;hue, float &amp;saturation, float &amp;value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#ga94042640abb264c85f8c030581e2eacf">HTCSreadHSV</a> (<a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a> muxsensor, float &amp;hue, float &amp;saturation, float &amp;value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#gac44edcceb5417b277cfe77a795bee8f1">HTCSreadColorIndex</a> (tSensors link)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__htsmux.html#gae535601c6d1a8544ed23e79d545ce45c">tConfigParams</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#ga893e1213ff25f453ddaf5459a46e1741">HTCS_config</a> = {HTSMUX_CHAN_I2C, 4, 0x02, 0x42}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#ga41f32070b6744358c9a81806f6552828">HTCS_I2CRequest</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htcs.html#ga755eeaa1ceaec836d19810e9fd7dc8c0">HTCS_I2CReply</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>HiTechnic Color Sensor V1 </p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="gaee2f2c7a03a73d2795e10e41f8b30a04"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCS_BLUE_RAW_REG" ref="gaee2f2c7a03a73d2795e10e41f8b30a04" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTCS_BLUE_RAW_REG&#160;&#160;&#160;0x06</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Raw blue reading (2 bytes) </p>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00062">62</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="gac6e1008ac54bd796727bb2b024c94b5c"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCS_BLUE_REG" ref="gac6e1008ac54bd796727bb2b024c94b5c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTCS_BLUE_REG&#160;&#160;&#160;0x03</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Blue reading </p>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00059">59</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga55a7e1240a43a39633d65c210ed0f921"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCS_CAL_WHITE" ref="ga55a7e1240a43a39633d65c210ed0f921" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTCS_CAL_WHITE&#160;&#160;&#160;0x43</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Command to calibrate white </p>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00068">68</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="gae677f5ade0fb6cf293a3c05a19130b45"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCS_CMD_REG" ref="gae677f5ade0fb6cf293a3c05a19130b45" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTCS_CMD_REG&#160;&#160;&#160;0x41</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Command register </p>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00054">54</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga48031d09dc69fa4ddeeaa5048b0cc7b6"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCS_COLNUM_REG" ref="ga48031d09dc69fa4ddeeaa5048b0cc7b6" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTCS_COLNUM_REG&#160;&#160;&#160;0x00</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Color number </p>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00056">56</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="gafbcd3ba05b2d2cd43a4846dc7fdb9718"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCS_GREEN_RAW_REG" ref="gafbcd3ba05b2d2cd43a4846dc7fdb9718" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTCS_GREEN_RAW_REG&#160;&#160;&#160;0x05</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Raw green reading (2 bytes) </p>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00061">61</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga2bc065e0ae0c88b3a2274b2f2c5029ab"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCS_GREEN_REG" ref="ga2bc065e0ae0c88b3a2274b2f2c5029ab" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTCS_GREEN_REG&#160;&#160;&#160;0x02</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Green reading </p>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00058">58</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga2a76ad0892f996cc7178faaf9791f192"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCS_I2C_ADDR" ref="ga2a76ad0892f996cc7178faaf9791f192" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTCS_I2C_ADDR&#160;&#160;&#160;0x02</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>HTCS I2C device address </p>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00053">53</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="gae484aed41a5751ac670d59b93c381ef6"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCS_OFFSET" ref="gae484aed41a5751ac670d59b93c381ef6" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTCS_OFFSET&#160;&#160;&#160;0x42</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Offset for data registers </p>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00055">55</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga231348f4db7df4344265d3cfe43f8cba"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCS_RED_RAW_REG" ref="ga231348f4db7df4344265d3cfe43f8cba" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTCS_RED_RAW_REG&#160;&#160;&#160;0x04</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Raw red reading (2 bytes) </p>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00060">60</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="gadfe281ee2acf1c368a01f11c9ced2301"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCS_RED_REG" ref="gadfe281ee2acf1c368a01f11c9ced2301" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTCS_RED_REG&#160;&#160;&#160;0x01</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Red reading </p>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00057">57</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga78d88dda248094bc368357c17a744677"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTSC_BLUE_NORM_REG" ref="ga78d88dda248094bc368357c17a744677" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTSC_BLUE_NORM_REG&#160;&#160;&#160;0x0A</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Normalised blue reading </p>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00066">66</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga86e23f552e2b245ab759832545c65e69"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTSC_COL_INDEX_REG" ref="ga86e23f552e2b245ab759832545c65e69" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTSC_COL_INDEX_REG&#160;&#160;&#160;0x07</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Color index number </p>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00063">63</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga674677aff9b035ad76b8aa7088d80614"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTSC_GREEN_NORM_REG" ref="ga674677aff9b035ad76b8aa7088d80614" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTSC_GREEN_NORM_REG&#160;&#160;&#160;0x09</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Normalised green reading </p>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00065">65</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga63ecff1a93442ac51d80d87b3ef2a31d"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTSC_RED_NORM_REG" ref="ga63ecff1a93442ac51d80d87b3ef2a31d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTSC_RED_NORM_REG&#160;&#160;&#160;0x08</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Normalised red reading </p>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00064">64</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga850041d1cce06d2fe714780bba407040"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCScalWhite" ref="ga850041d1cce06d2fe714780bba407040" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool HTCScalWhite </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Calibrate the sensor for white. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTCS port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if no error occured, false if it did </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="hitechnic-colour-v1-test2_8c-example.html#a0">hitechnic-colour-v1-test2.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00298">298</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga2ffe78205a159ffd11e8074665c293dc"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCSreadColor" ref="ga2ffe78205a159ffd11e8074665c293dc" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int HTCSreadColor </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the color number currently detected. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTCS port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>color index number or -1 if an error occurred. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="hitechnic-colour-v1-_s_m_u_x-test1_8c-example.html#a1">hitechnic-colour-v1-SMUX-test1.c</a>, and <a class="el" href="hitechnic-colour-v1-test1_8c-example.html#a0">hitechnic-colour-v1-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00091">91</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga38b8b7f82814d32cba3d6a6f54a85a85"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCSreadColor" ref="ga38b8b7f82814d32cba3d6a6f54a85a85" args="(tMUXSensor muxsensor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int HTCSreadColor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a>&#160;</td>
          <td class="paramname"> <em>muxsensor</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the color number currently detected. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">muxsensor</td><td>the SMUX sensor port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>color index number or -1 if an error occurred. </dd></dl>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00111">111</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="gac44edcceb5417b277cfe77a795bee8f1"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCSreadColorIndex" ref="gac44edcceb5417b277cfe77a795bee8f1" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int HTCSreadColorIndex </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the color index number currently detected. This is a single 6 bit number color index. Bits 5 and 4 encode the red signal level, bits 3 and 2 encode the green signal level and bits 1 and 0 encode the blue signal levels. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTCS port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>color index number or -1 if an error occurred. </dd></dl>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00280">280</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga27de3044e46a7fc9dda2602617559928"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCSreadHSV" ref="ga27de3044e46a7fc9dda2602617559928" args="(tSensors link, float &amp;hue, float &amp;saturation, float &amp;value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool HTCSreadHSV </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"> <em>hue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"> <em>saturation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"> <em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the detection levels for the hue, saturation, value components. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTCS port number </td></tr>
    <tr><td class="paramname">hue</td><td>the hue output value (from 0 to 365, or -1 if n/a) </td></tr>
    <tr><td class="paramname">saturation</td><td>the saruration output value (from 0 to 100, or -1 if n/a) </td></tr>
    <tr><td class="paramname">value</td><td>the value output value (from 0 to 100) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if no error occured, false if it did </dd></dl>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00188">188</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga94042640abb264c85f8c030581e2eacf"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCSreadHSV" ref="ga94042640abb264c85f8c030581e2eacf" args="(tMUXSensor muxsensor, float &amp;hue, float &amp;saturation, float &amp;value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool HTCSreadHSV </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a>&#160;</td>
          <td class="paramname"> <em>muxsensor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"> <em>hue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"> <em>saturation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"> <em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the detection levels for the hue, saturation, value components. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">muxsensor</td><td>the SMUX sensor port number </td></tr>
    <tr><td class="paramname">hue</td><td>the hue output value (from 0 to 365, or -1 if n/a) </td></tr>
    <tr><td class="paramname">saturation</td><td>the saruration output value (from 0 to 100, or -1 if n/a) </td></tr>
    <tr><td class="paramname">value</td><td>the value output value (from 0 to 100) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if no error occured, false if it did </dd></dl>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00207">207</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="gac07b9f4043e6abbd7d80785afb1e0e6d"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCSreadNormRGB" ref="gac07b9f4043e6abbd7d80785afb1e0e6d" args="(tSensors link, int &amp;red, int &amp;green, int &amp;blue)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool HTCSreadNormRGB </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>red</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>green</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>blue</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the normalised RGB readings. The normalization sets the highest value of the three Red, Green and Blue reading to 255 and adjusts the other two proportionately. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTCS port number </td></tr>
    <tr><td class="paramname">red</td><td>the red value </td></tr>
    <tr><td class="paramname">green</td><td>the green value </td></tr>
    <tr><td class="paramname">blue</td><td>the blue value </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if no error occured, false if it did </dd></dl>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00229">229</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="gae17b52a255db2290b22bc25fb966eed1"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCSreadRawRGB" ref="gae17b52a255db2290b22bc25fb966eed1" args="(tSensors link, int &amp;red, int &amp;green, int &amp;blue)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool HTCSreadRawRGB </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>red</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>green</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>blue</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the raw RGB readings, these are 10bit values. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTCS port number </td></tr>
    <tr><td class="paramname">red</td><td>the red value </td></tr>
    <tr><td class="paramname">green</td><td>the green value </td></tr>
    <tr><td class="paramname">blue</td><td>the blue value </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if no error occured, false if it did </dd></dl>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00255">255</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga0cc4cf1c6fc26e88fc7a708857ef7ca2"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCSreadRGB" ref="ga0cc4cf1c6fc26e88fc7a708857ef7ca2" args="(tMUXSensor muxsensor, int &amp;red, int &amp;green, int &amp;blue)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool HTCSreadRGB </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a>&#160;</td>
          <td class="paramname"> <em>muxsensor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>red</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>green</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>blue</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the detection levels for the three color components. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">muxsensor</td><td>the SMUX sensor port number </td></tr>
    <tr><td class="paramname">red</td><td>the red value </td></tr>
    <tr><td class="paramname">green</td><td>the green value </td></tr>
    <tr><td class="paramname">blue</td><td>the blue value </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if no error occured, false if it did </dd></dl>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00161">161</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga4de07d555366975fb0673524cdec7b57"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCSreadRGB" ref="ga4de07d555366975fb0673524cdec7b57" args="(tSensors link, int &amp;red, int &amp;green, int &amp;blue)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool HTCSreadRGB </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>red</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>green</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>blue</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the detection levels for the three color components. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTCS port number </td></tr>
    <tr><td class="paramname">red</td><td>the red value </td></tr>
    <tr><td class="paramname">green</td><td>the green value </td></tr>
    <tr><td class="paramname">blue</td><td>the blue value </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if no error occured, false if it did </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="hitechnic-colour-v1-_s_m_u_x-test1_8c-example.html#a2">hitechnic-colour-v1-SMUX-test1.c</a>, and <a class="el" href="hitechnic-colour-v1-test1_8c-example.html#a1">hitechnic-colour-v1-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00134">134</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="ga893e1213ff25f453ddaf5459a46e1741"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCS_config" ref="ga893e1213ff25f453ddaf5459a46e1741" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__htsmux.html#gae535601c6d1a8544ed23e79d545ce45c">tConfigParams</a> <a class="el" href="group__htcs.html#ga893e1213ff25f453ddaf5459a46e1741">HTCS_config</a> = {HTSMUX_CHAN_I2C, 4, 0x02, 0x42}</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Array to hold SMUX config data for sensor </p>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00080">80</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga755eeaa1ceaec836d19810e9fd7dc8c0"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCS_I2CReply" ref="ga755eeaa1ceaec836d19810e9fd7dc8c0" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a> <a class="el" href="group__htcs.html#ga755eeaa1ceaec836d19810e9fd7dc8c0">HTCS_I2CReply</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Array to hold I2C reply data </p>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00084">84</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga41f32070b6744358c9a81806f6552828"></a><!-- doxytag: member="hitechnic&#45;colour&#45;v1.h::HTCS_I2CRequest" ref="ga41f32070b6744358c9a81806f6552828" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a> <a class="el" href="group__htcs.html#ga41f32070b6744358c9a81806f6552828">HTCS_I2CRequest</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Array to hold I2C command data </p>

<p>Definition at line <a class="el" href="hitechnic-colour-v1_8h_source.html#l00083">83</a> of file <a class="el" href="hitechnic-colour-v1_8h_source.html">hitechnic-colour-v1.h</a>.</p>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Mar 13 2013 19:56:44 for ROBOTC Drivers by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
</body>
</html>
